package com.dlc.shop.bean.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author Yami
 */
@Data
@TableName("tz_form")
public class Form implements Serializable {
    private static final long serialVersionUID = -3468251351681518798L;
    /**
     * 主键
     */
    @TableId
    @Schema(description = "报表id" )
    private Long formId;

    @Schema(description = "店铺id" )
    private Long shopId;

    @Schema(description = "报表名称" )
    private String formName;

    @Schema(description = "推荐报表介绍内容" )
    private String content;

    @Schema(description = "报表类型 1:店铺报表" )
    private Integer fromType;

    @Schema(description = "时间周期 1:天 2:周 3:月" )
    private Integer timeType;

    @Schema(description = "时间格式 1:自定义时间 2:指定时间范围" )
    private Integer timeFormat;

    @Schema(description = "报表选择指标" )
    private String formItemIds;

    @Schema(description = "开始时间" )
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    @Schema(description = "结束时间" )
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    @Schema(description = "时间范围" )
    private Integer timeRamge;

    @Schema(description = "创建时间" )
    private Date createTime;

    @Schema(description = "更新时间" )
    private Date updateTime;

    @Schema(description = "序号" )
    private Integer seq;

    @TableField(exist = false)
    @Schema(description = "推荐报表 true：推荐报表  false：店铺报表" )
    private Boolean recommendForm;

    @TableField(exist = false)
    @Schema(description = "报表项列表" )
    private List<FormItem> formItemList;


}
